package com.example.pay.controller;

import com.example.api.pay.PayOrder;
import com.example.api.pay.PayServiceApi;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @author 86188
 */
@RestController
public class PayController implements PayServiceApi {

    @Override
    public PayOrder createPayOrder() {
        PayOrder payOrder = new PayOrder();
        payOrder.setId(Long.toHexString(System.currentTimeMillis()));
        payOrder.setPayAmount(new BigDecimal(100.00));
        payOrder.setResult("ok");
        return payOrder;
    }
}
